﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TianShiProject.Migrations
{
    public partial class tianshen12 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
          

            migrationBuilder.CreateTable(
                name: "LiZhiShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    LeaveNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LeaveName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    LastTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Cause = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Approver = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LiZhiShen", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "PaymentShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ApplyNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Headline = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PaymentAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    ClearingForm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ObjectOfPayment = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OpeningBank = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BankAccount = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DateOfPayment = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UserDescribe = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remarkm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Accessory = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Proposer = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EstablishTimez = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ApprovalStatusj = table.Column<int>(type: "int", nullable: false),
                    Approverg = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PaymentShen", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "RecipientShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    RecipientsToApplyNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Headlinek = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UseDescribes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remarkm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecipientsItems = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Recipienter = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReceiveTimek = table.Column<DateTime>(type: "datetime2", nullable: false),
                    EstablishTimek = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ApprovalStatusk = table.Column<int>(type: "int", nullable: false),
                    Approverk = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RecipientShen", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "RequestShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    PurchaseApplyNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodsName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Typey = table.Column<int>(type: "int", nullable: false),
                    Texture = table.Column<int>(type: "int", nullable: false),
                    Specification = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Nationw = table.Column<int>(type: "int", nullable: false),
                    Province = table.Column<int>(type: "int", nullable: false),
                    Numbers = table.Column<int>(type: "int", nullable: false),
                    ExpectDeliveryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UseDescribes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remarkm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Applicatp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EstablishTimez = table.Column<DateTime>(type: "datetime2", nullable: false),
                    AuditStatep = table.Column<int>(type: "int", nullable: false),
                    Approverp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RequestShen", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "RuZhiShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    EntryNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EntryName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RuZhiShen", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ZhuanZhengShen",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    PromotionNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PromotionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ApplyTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Summarize = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    Idea = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ZhuanZhengShen", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
           

            migrationBuilder.CreateTable(
                name: "LiZhi",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Approver = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Cause = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    LastTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    LeaveName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LeaveNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    State = table.Column<int>(type: "int", nullable: false),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LiZhi", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Recipient",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ApprovalStatusk = table.Column<int>(type: "int", nullable: false),
                    Approverk = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EstablishTimek = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Headlinek = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    ReceiveTimek = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Recipienter = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecipientsItems = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecipientsToApplyNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remarkm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UseDescribes = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Recipient", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Request",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Applicatp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Approverp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AuditStatep = table.Column<int>(type: "int", nullable: false),
                    EstablishTimez = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ExpectDeliveryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    GoodsName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    Nationw = table.Column<int>(type: "int", nullable: false),
                    Numbers = table.Column<int>(type: "int", nullable: false),
                    Province = table.Column<int>(type: "int", nullable: false),
                    PurchaseApplyNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remarkm = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Specification = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Texture = table.Column<int>(type: "int", nullable: false),
                    Typey = table.Column<int>(type: "int", nullable: false),
                    UseDescribes = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Request", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "RuZhi",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    EntryName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EntryNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    State = table.Column<int>(type: "int", nullable: false),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RuZhi", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ZhuanZheng",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ApplyTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DeptId = table.Column<int>(type: "int", nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Idea = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<int>(type: "int", nullable: false),
                    PositionId = table.Column<int>(type: "int", nullable: false),
                    PromotionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PromotionNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    State = table.Column<int>(type: "int", nullable: false),
                    Summarize = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SuperiorManager = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ZhuanZheng", x => x.Id);
                });
        }
    }
}
